<!DOCTYPE html>



<html>







<head>



	<meta charset="utf-8">



	<title></title>



	<meta name="renderer" content="webkit">



	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">



	<meta name="viewport"
		content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">



	<link rel="stylesheet" href="/public/static/layuiadmin/layui/css/layui.css" media="all">



	<link rel="stylesheet" href="/public/static/layuiadmin/style/admin.css" media="all">

	<style>
		.layui-form-label {
			width: 160px !important;
		}

		.layui-input-block {
			margin-left: 190px;
		}
	</style>



</head>







<body>



	<div class="layui-fluid">



		<div class="layui-card">



			<div class="layui-card-body" style="padding: 15px;">



				<form class="layui-form" method="post" lay-filter="component-form-group" id="moduleForm">



					<input type="hidden" name="module_id" value="{$params.module_id}" />



					<div class="layui-form-item">



						<label class="layui-form-label">会员姓名</label>



						<div class="layui-input-block">



							<input type="text" name="name" lay-verify="required" placeholder="请输入会员姓名"
								autocomplete="off" class="layui-input">



						</div>



					</div>



					<div class="layui-form-item">



						<label class="layui-form-label">手机号</label>



						<div class="layui-input-block">



							<input type="text" name="phone" lay-verify="required" placeholder="请输入手机号"
								autocomplete="off" class="layui-input">



						</div>



					</div>



					<div class="layui-form-item">



						<label class="layui-form-label">密码</label>



						<div class="layui-input-block">



							<input type="text" name="password" value="123456a" lay-verify="required" placeholder="请输入密码"
								autocomplete="off" class="layui-input">



						</div>



					</div>



					<div class="layui-form-item">



						<label class="layui-form-label">出生日期</label>



						<div class="layui-input-block">



							<input type="text" name="birthday" id="birthday" placeholder="请输入出生日期" autocomplete="off"
								class="layui-input">



						</div>



					</div>



					<div class="layui-form-item">



						<label class="layui-form-label">性别</label>



						<div class="layui-input-block">



							<input type="radio" name="sex" value="3" title="保密" checked>



							<input type="radio" name="sex" value="1" title="男">



							<input type="radio" name="sex" value="2" title="女">



						</div>



					</div>



					<div class="layui-form-item layui-layout-admin">



						<div class="layui-input-block">



							<div class="layui-footer" style="left: 0;">



								<button class="layui-btn" lay-submit="" lay-filter="component-form-demo1">立即提交</button>



								<button type="reset" class="layui-btn layui-btn-primary">重置</button>



							</div>



						</div>



					</div>



				</form>



			</div>



		</div>



	</div>



	<script src="/public/static/layuiadmin/layui/layui.js"></script>



	<script>



		layui.config({



			base: '/public/static/layuiadmin/' // 静态资源所在路径



		}).extend({



			index: 'lib/index', // 主入口模块



			api: 'api'



		}).use(['index', 'form', 'laydate', 'api', 'upload'], function () {



			var $ = layui.$,



				admin = layui.admin,



				element = layui.element,



				layer = layui.layer,



				laydate = layui.laydate,



				api = layui.api,



				upload = layui.upload,



				form = layui.form;







			laydate.render({



				elem: '#birthday' // 指定元素



			});







			form.render(null, 'component-form-group');







			/* 监听提交 */



			form.on('submit(component-form-demo1)', function (data) {



				var dats = data.field;



				var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引



				layer.msg('加载中', {



					icon: 16,



					shade: 0.01



				});



				api.ajax('{:url("save")}', 'post', 'json', dats, function (res) {



					layer.closeAll('loading');



					layer.msg(res.msg);



					if (res.code === 0) {



						$("#moduleForm")[0].reset();



					}



				});



				return false;



			});



		});



	</script>



</body>







</html>